<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            height: 200px;
            background: #caf;
        }
    </style>
</head>
<body>
    <div id="box">
        <a href="http://atguigu.com">尚硅谷</a>
        <input type="text">
    </div>

    <script>
        //获取元素
        let box = document.querySelector('#box');
        //
        let a = document.querySelector('a');
        let input = document.querySelector('input');

        //绑定事件
        box.ontouchstart = function(e){
            console.log('你触摸了我...');
            //阻止默认行为  放置页面露白
            e.preventDefault();
        }

        a.ontouchstart = function(e){
            //阻止冒泡
            e.stopPropagation();
        }

        input.ontouchstart = function(e){
            e.stopPropagation();
        }


    </script>
</body>
</html>